package com.sinocare.project.common.entity;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 * 菜单权限表(SccMenu)表实体类
 *
 * @author makejava
 * @since 2021-12-20 19:07:31
 */
@Data
@SuppressWarnings("serial")
@TableName(value = "scc_menu")
public class SccMenu extends Model<SccMenu> {
    //主键、菜单id
    @TableId(value = "menu_id",type = IdType.AUTO)
    private Integer menuId;
    //菜单名称
    private String menuName;
    //父菜单id(默认0)
    private Integer pId;
    //路径
    private String url;
    //菜单组位置(位置的序号，默认0)
    private Integer seq;
    //状态(0禁用1正常，默认1)
    private Integer status;
    //创建时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
    private Date createTime;
    //修改时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
    private Date updateTime;
    //备注
    private String remark;
    //类型(目录或菜单，默认folder)
    private String type;
    //前端图标
    private String icon;
    //下拉样式
    private String target;
    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    public Serializable pkVal() {
        return this.menuId;
    }
}

